import ajax from '@/utils/request'

// 检查是否在其他地方登录
export function checkLogin(params) {
  return ajax.post({
    url: '/login/loginCheck',
    params: params
  })
}

// 登录
export function login(params) {
  return ajax.post({
    url: '/yos-user/auth/yosWebLogin/v001',
    params: params
  })
}

// 验证验证码是否正确
export function verifyCaptcha(params) {
  return ajax.post({
    url: '/yos-user/auth/verifyCaptcha',
    params: params
  })
}

// 获取pid
export function getPid(params) {
  return ajax.post({
    url: '/yos-user/auth/selectOrg/v001',
    params: params
  })
}

// 退出登录
export function logout(params) {
  return ajax.post({
    url: '/yos-user/auth/yosLogout/v001',
    params: params
  })
}

// 获取所属机构药监监管单位
export function getElecType(params) {
  return ajax.post({
    url: '/drug-safety/yjOrg/getElecType/v001',
    params: params
  })
}
